{template '/web/_header'}
<script type="text/javascript" src="{UNPOR_BABY_LOCAL_STATIC}highcharts/highcharts.js"></script>
<!--主体内容-->
<div class="layui-body">
	<div class="layadmin-tabsbody-item layui-show">
		<div class="layui-card layadmin-header">
			<div class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
				当前位置：{$pageObj['crumbs']}
			</div>
		</div>

		<div class="layui-fluid">
			<div class="layui-card">
				<div class="layui-card-header">添加</div>
				<div class="layui-card-body" style="padding: 15px;">
					<form class="layui-form" action="" lay-filter="component-form-group">
						<div class="layui-form-item">
							<label class="layui-form-label">单行输入框</label>
							<div class="layui-input-block">
								<input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="请输入标题" class="layui-input">
							</div>
						</div>

						<div class="layui-form-item">
							<label class="layui-form-label">验证身份证</label>
							<div class="layui-input-block">
								{php echo kit_tpl_form_field_image('multi_image',$value = '', $default = '', $options = array(), $input = array('lay-verify'=>'required'));}
							</div>
						</div>

						<div class="layui-form-item layui-form-text">
							<label class="layui-form-label">普通文本域</label>
							<div class="layui-input-block">
								{php echo kit_tpl_ueditor('content',$value = '', $options = array(), $input = array('lay-verify'=>'required'));}
							</div>
						</div>

						<div class="layui-form-item">
							<div class="layui-input-block">
								<div class="layui-footer" style="height: 60px;z-index: 999;">
									<button class="layui-btn" lay-submit="" lay-filter="add">立即提交</button>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>

<script>
    //一般直接写在一个js文件中
    layui.use(['form', 'layedit', 'laydate', 'element', 'layer', 'upload'], function(){
        var form = layui.form,
            layer = layui.layer;

        // 监听提交，发送请求
        form.on('submit(add)', function(data){
            $.post("{php echo $this->createWebUrl('user/member/add')}",data.field,function(data){
                // 获取 session
                var url = "{php echo $this->createWebUrl('common/go', array('go'=>'user','dodo'=>'member','operate'=>'list'))}";
                kit_js_alert(data, url);
            });
            return false;
        });
    });
</script>


{template 'web/_footer'}